package com.thprojects.myphotomemories.model;

import android.graphics.Bitmap;
import android.os.Parcel;
import android.os.Parcelable;

public class Album implements Parcelable{
	String mName;
	String mDescription;
	int mId;
	//cover image
	Bitmap mBitmapBig;
	Bitmap mBitmapSmall;
	
	public Album(String name, String description, int id) {
		mName = name;
		mDescription = description;
		mId = id;
	}
	
	private Album(Parcel in){
		mName = in.readString();
		mDescription = in.readString();
		mId = in.readInt();
	}

	public int getId(){
		return mId;
	}
	
	/**
	 * @return the mName
	 */
	public String getName() {
		return mName;
	}

	/**
	 * @param mName the mName to set
	 */
	public void setName(String mName) {
		this.mName = mName;
	}

	/**
	 * @return the mDescription
	 */
	public String getDescription() {
		return mDescription;
	}

	/**
	 * @param mDescription the mDescription to set
	 */
	public void setDescription(String mDescription) {
		this.mDescription = mDescription;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return mName + ": " + mDescription;
	}

	public int describeContents() {
		return 0;
	}

	public void writeToParcel(Parcel out, int arg1) {
		out.writeString(mName);
		out.writeString(mDescription);
		out.writeInt(mId);
	}
	
	// this is used to regenerate your object. All Parcelables must have a CREATOR that implements these two methods
    public static final Parcelable.Creator<Album> CREATOR = new Parcelable.Creator<Album>() {
        public Album createFromParcel(Parcel in) {
            return new Album(in);
        }

        public Album[] newArray(int size) {
            return new Album[size];
        }
    };
	
}
